﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Tracy.DataModel;

namespace Tracy.Handlers
{
    public class StartDownloadHandler : TaskMessageHandler
    {
        protected override void ProcessMessage(Messages.TaskMessage msg)
        {
            if (msg != null && msg.Data != null && msg.Data is Resource)
            {
                Resource resourceToDownload = msg.Data as Resource;
                if (resourceToDownload != null)
                {
                    TracyFacade.Instance.DownloadManager.DownloadResource(resourceToDownload);
                }
            }
        }
    }
}
